Python SQLite error only when run from terminal

welcome to shbcf.ru